import request from '@/utils/request'

//商城管理-广告管理列表
export function listAd(query){
    return request({
        url: '/ad/list',
        method: 'get',
        params: query
    })
}

//商城管理-新增广告
export function createAd(data){
    return request({
        url: '/ad/create',
        method: 'post',
        data
    })
}

//商城管理-修改广告
export function updateAd(data){
    return request({
        url: '/ad/update',
        method: 'post',
        data
    })
}

//商城管理-删除广告
export function deleteAd(data){
    return request({
        url: '/ad/delete',
        method: 'post',
        data
    })
}

// 上传路径常量
const uploadPath = process.env.BASE_API + '/storage/create'
export { uploadPath }